#ifndef GLTEXTURES_H_
#define GLTEXTURES_H_

#include <vector>

#include "gl.h"

#include "GameState.h"

namespace catan
{

class GLTextures
{
public:
	GLTextures(GameState &gameState);
	virtual ~GLTextures();
	void create();
	void dispose();
	void refresh();
	GLuint getSheepTexture() const;
	GLuint getWoodsTexture() const;
	GLuint getWheatTexture() const;
	GLuint getBrickTexture() const;
	GLuint getOreTexture() const;
	GLuint getDesertTexture() const;
	GLuint getSeaTexture() const;
	GLuint getGeneralHarborTexture() const;
	GLuint getWoodHarborTexture() const;
	GLuint getSheepHarborTexture() const;
	GLuint getWheatHarborTexture() const;
	GLuint getBrickHarborTexture() const;
	GLuint getOreHarborTexture() const;
	GLuint getOKButtonTexture() const;
	GLuint getOKButtonDisabledTexture() const;
	GLuint getRandomizeTexture() const;
	GLuint getStartGameTexture() const;
	GLuint getTextWithWhiteBackgroundTexture() const;
	GLuint getTextWithBlackBackgroundTexture() const;
	GLuint getLogoTexture() const;
	GLuint getTileTexture(int tileNumber) const;
	GLuint getButtonBankTradeTexture () const;
	GLuint getButtonBankTradeDisabledTexture () const;
	GLuint getButtonBankTradePressedTexture () const;
	GLuint getButtonBuyCityTexture () const;
	GLuint getButtonBuyDevCardTexture () const;
	GLuint getButtonBuyDevCardDisabledTexture () const;
	GLuint getButtonBuyRoadTexture () const;
	GLuint getButtonBuyRoadDisabledTexture () const;
	GLuint getButtonBuyRoadPressedTexture () const;
	GLuint getButtonBuySettlementTexture () const;
	GLuint getButtonBuySettlementDisabledTexture () const;
	GLuint getButtonBuySettlementPressedTexture () const;
	GLuint getButtonCityUpgradeTexture () const;
	GLuint getButtonCityUpgradeDisabledTexture () const;
	GLuint getButtonCityUpgradePressedTexture () const;
	GLuint getButtonEndTurnTexture () const;
	GLuint getButtonEndTurnDisabledTexture () const;
	GLuint getButtonPlayerTradeTexture () const;
	GLuint getButtonPlayerTradeDisabledTexture () const;
	GLuint getButtonPlayerTradePressedTexture () const;
	GLuint getButtonRollDiceTexture () const;
	GLuint getButtonRollDiceDisabledTexture () const;
	GLuint getDiceTexture() const;
	
private:
	void createTexture(char* imagePath, GLuint &texture);
	GLuint sheepTexture;
	GLuint woodsTexture;
	GLuint wheatTexture;
	GLuint brickTexture;
	GLuint oreTexture;
	GLuint desertTexture;
	GLuint seaTexture;
	GLuint generalHarborTexture;
	GLuint woodHarborTexture;
	GLuint sheepHarborTexture;
	GLuint wheatHarborTexture;
	GLuint brickHarborTexture;
	GLuint oreHarborTexture;
	GLuint tileTextures[13];
	GLuint okButtonTexture;
	GLuint okButtonDisabledTexture;
	GLuint randomizeTexture;
	GLuint startGameTexture;
	GLuint textWithWhiteBackgroundTexture;
	GLuint textWithBlackBackgroundTexture;
	GLuint logoTexture;
	GLuint buttonBankTradeTexture;
	GLuint buttonBankTradeDisabledTexture;
	GLuint buttonBankTradePressedTexture;
	GLuint buttonBuyCityTexture;
	GLuint buttonBuyDevCardTexture;
	GLuint buttonBuyDevCardDisabledTexture;
	GLuint buttonBuyRoadTexture;
	GLuint buttonBuyRoadDisabledTexture;
	GLuint buttonBuyRoadPressedTexture;
	GLuint buttonBuySettlementTexture;
	GLuint buttonBuySettlementDisabledTexture;
	GLuint buttonBuySettlementPressedTexture;
	GLuint buttonCityUpgradeTexture;
	GLuint buttonCityUpgradeDisabledTexture;
	GLuint buttonCityUpgradePressedTexture;
	GLuint buttonEndTurnTexture;
	GLuint buttonEndTurnDisabledTexture;
	GLuint buttonPlayerTradeTexture;
	GLuint buttonPlayerTradeDisabledTexture;
	GLuint buttonPlayerTradePressedTexture;
	GLuint buttonRollDiceTexture;
	GLuint buttonRollDiceDisabledTexture;
	GLuint diceTexture;
	
	std::vector<GLuint> loadedTextures;
	GameState *gameStateRef;
	bool isDisposed;

};

}

#endif /*GLTEXTURES_H_*/
